{% load i18n js %}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
<div id="flash-plugin-{{ object.id }}">{% trans 'Missing flash plugin.' %}</div>

<script type="text/javascript" defer="defer">//<![CDATA[
	var flashvars = {
		movie: "{{ MEDIA_URL }}{{ object.movie }}",
		volume: {{ object.volume }},
		autoplay: {{ object.auto_play|bool }},
		autoload: {{ object.auto_load|bool }},
		loop: {{ object.loop|bool }},
		fullscreen: {{ object.fullscreen|bool }},
		fgcolor: "{{ object.fgcolor }}",
		mute: "{{ object.mute }}",
		muteonly: "{{ object.mute_only }}",
		controller_style: "{{ object.controller_style }}"
	};
	
	{% if object.image %}
		flashvars.image = "{{ MEDIA_URL }}{{ object.image}}";
	{% endif %}
	{% if object.click_url %}
		flashvars.clickurl = "{{ object.click_url }}";
		flashvars.clicktarget = "{{ object.click_target }}";
	{% endif %}
				
	var params = {
		allowscriptaccess: "always",
		allowfullscreen: {{ object.fullscreen|bool }},
		bgcolor: "#{{ object.bgcolor }}",
		wmode: "{{ object.wmode }}",
		menu: {{ object.flash_menu|bool }}
	};
		
	var attributes = {};
	swfobject.embedSWF("{{ MEDIA_URL }}cms/swf/player.swf", "flash-plugin-{{ object.id }}", "{{ object.get_width }}", "{{ object.get_height }}", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
//]]></script>